<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    .id{
      position: relative;
      width: 500px;
      height: 500px;
      background-color: pink;
    }
    .chil{
      position: absolute;
      width: 200px;
      height: 100px;
      /* margin: auto; */
      background-color: aqua;
      top: 50%;
      left: 50%;
      transform: translate(-50%,-50%);
    }
    
  </style>
</head>
<body>
  <div class="id">
      <div class="chil"></div>
  </div>
</body>
</html>